import { createMemoryHistory, createRouter } from 'vue-router'
import Tab from "@/components/Tab.vue";
import HomeView from '@/views/HomePage.vue'
import LoginView from "@/views/LoginView.vue";
const routes = [
    { path: '/', redirect: '/home', component: HomeView },
    {
        path: '/',
        component: Tab,
        children: [
            {
                path: '',
                redirect: '/home',
            },
            {
                path: 'home',
                component: () => import('@/views/HomePage.vue'),
            },
            {
                path: 'documents',
                component: () => import('@/views/DocumentsPage.vue'),
            },
            {
                path: 'mine',
                component: () => import('@/views/MinePage.vue'),
            },
        ]
    },
    { path: '/inStock', name:'inStock', component: () => import('@/views/product/InStock.vue')},
    { path: '/SelectProducts', name:'SelectProducts', component: () => import('@/views/product/SelectProducts.vue')},
    { path: '/Next', name:'Next', component: () => import('@/views/product/Next.vue')},
    { path: '/Successful', name:'Successful', component: () => import('@/views/product/Successful.vue')},
    { path: '/InventoryList', name:'InventoryList', component: () => import('@/views/product/InventoryList.vue')},
    { path: '/outStock', name:'outStock', component: () => import('@/views/product/OutStock.vue')},
    { path: '/ProductLibrary', name:'ProductLibrary', component: () => import('@/views/product/ProductLibrary.vue')},
    { path: '/Details', name:'Details', component: () => import('@/views/product/Details.vue')},
    { path: '/New', name:'New', component: () => import('@/views/product/NewProduct.vue')},
    { path: '/Inventory', name:'Inventory', component: () => import('@/views/product/Inventory.vue')},
    { path: '/Warehouse', name:'Warehouse', component: () => import('@/views/warehouse/Warehouse.vue')},
    { path: '/WareDetail', name:'WareDetail', component: () => import('@/views/warehouse/wareDetail.vue')},
    { path: '/addWarehouse', name:'addWarehouse', component: () => import('@/views/warehouse/addWarehouse.vue')},
    { path: '/addDetail', name:'addDetail', component: () => import('@/views/warehouse/addDetail.vue')},
    { path: '/InventoryList', name:'InventoryList', component: () => import('@/views/warehouse/InventoryList.vue')},
    { path: '/Dialing', name:'Dialing', component: () => import('@/views/warehouse/Dialing.vue')},
    { path: '/InventoryReport', name:'InventoryReport', component: () => import('@/views/statistics/InventoryReport.vue')},
    { path: '/OutboundReport', name:'OutboundReport', component: () => import('@/views/statistics/OutboundReport.vue')},
    { path: '/GoodsOutbound', name:'GoodsOutbound', component: () => import('@/views/statistics/GoodsOutbound.vue')},
    { path: '/GoodsWarehousing', name:'GoodsWarehousing', component: () => import('@/views/statistics/GoodsWarehousing.vue')},
    { path: '/WarehouseStatistics', name:'WarehouseStatistics', component: () => import('@/views/statistics/WarehouseStatistics.vue')},
    { path: '/InventoryStatistics', name:'InventoryStatistics', component: () => import('@/views/statistics/InventoryStatistics.vue')},
    { path: '/IncomingList', name:'IncomingList', component: () => import('@/views/documents/IncomingList.vue')},
    { path: '/InventoryTransfer', name:'InventoryTransfer', component: () => import('@/views/documents/InventoryTransfer.vue')},
    { path: '/InventoryStocktaking', name:'InventoryStocktaking', component: () => import('@/views/documents/InventoryStocktaking.vue')},
    { path: '/OutboundList', name:'OutboundList', component: () => import('@/views/documents/OutboundList.vue')},
    { path: '/Information', name:'Information', component: () => import('@/views/mine/Information.vue')},
    { path: '/Password', name:'Password', component: () => import('@/views/mine/Password.vue')},
    { path: '/login', component: LoginView}
]

const router = createRouter({
    history: createMemoryHistory(),
    routes,
})
export default router